CREATE TABLE [dbo].[Uch_pl]
(
[ik_uch_plan] [int] NOT NULL IDENTITY(1, 1),
[ik_year_uch_pl] [int] NOT NULL,
[ik_spec] [int] NOT NULL,
[ik_spclz] [int] NOT NULL,
[ik_form_ed] [int] NOT NULL,
[IsBRSPlan] [bit] NULL CONSTRAINT [DF_Uch_pl_IsBRS] DEFAULT ((1))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Uch_pl] ADD CONSTRAINT [PK_Uch_pl] PRIMARY KEY CLUSTERED  ([ik_uch_plan]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Uch_pl] ADD CONSTRAINT [IX_Uch_pl] UNIQUE NONCLUSTERED  ([ik_year_uch_pl], [ik_spec], [ik_spclz], [ik_form_ed]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Uch_pl] WITH NOCHECK ADD CONSTRAINT [FK_Uch_pl_Form_ed] FOREIGN KEY ([ik_form_ed]) REFERENCES [dbo].[Form_ed] ([Ik_form_ed])
GO
ALTER TABLE [dbo].[Uch_pl] WITH NOCHECK ADD CONSTRAINT [FK_Uch_pl_spclz] FOREIGN KEY ([ik_spclz]) REFERENCES [dbo].[spclz] ([iK_spclz])
GO
ALTER TABLE [dbo].[Uch_pl] WITH NOCHECK ADD CONSTRAINT [FK_Uch_pl_Spec_stud] FOREIGN KEY ([ik_spec]) REFERENCES [dbo].[Spec_stud] ([ik_spec])
GO
